﻿using DataFeedService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;

namespace DataFeedServiceHost
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                ServiceHost host = new ServiceHost(typeof(MarketDataService));

                host.Open();
                Console.WriteLine("Press any key to stop.");
                Console.ReadKey();

                if (host.State != CommunicationState.Closed)
                {
                    host.Close();
                }
            }
            catch(Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.ReadKey();
            }
        }
    }
}
